<%@ page import="java.util.List" %>
<%@ page import="com.neuedu.entity.Emp" %>
<%@ page import="com.neuedu.entity.User" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<html>
<head>
    <title>Title</title>
</head>
<body>


<h3>	MVC架构1 </h3>

      <a href="<%=request.getContextPath()%>/business/user/user_add.jsp">员工添加</a>
       <table border="1" width="100%"  cellpadding="0" cellspacing="0">
           	<tr align="center">
					<td>userid</td>
					<td>username</td>
					<td>password</td>
					<td>expire</td>
					<td>nickname</td>
					<td>lastlogin</td>
					<td>sal </td>
               		<td>操作</td>
               	</tr>

  <%
	  	List<User> users = (List<User>) request.getAttribute("users");
		String contextPath = request.getContextPath();
		for (int i = 0; i < users.size(); i++) {
			User user = users.get(i);

	  %>
           	<tr align="center">

				<td><%= user.getUserid()%></td>
				<td><%= user.getUserid()%></td>
				<td><%= user.getUsername()%></td>
				<td><%= user.getPassword()%></td>
				<td><%= user.getExpire()%></td>
				<td><%= user.getNickname()%></td>
				<td><%= user.getLastlogin()%></td>
				<td><%= user.getSal()%> </td>


               		<td>               
                   		  <a href='<%=request.getContextPath()%>/user?_type=toEdit&userid=<%=user.getUserid()%>'>修改</a>   &nbsp;&nbsp;&nbsp;&nbsp;
                   		  <a href='<%=request.getContextPath()%>/user?_type=deleteById&userid=<%=user.getUserid()%>'>删除</a>   &nbsp;&nbsp;&nbsp;&nbsp;
                   	   </td>
               	</tr>
		   <%}%></table>



</body>
</html>
